Add field-level validation for LinearLayout dimension inputs#14
Merged
Add field-level validation for LinearLayout dimension inputs#14
Conversation
Implements real-time validation with visual feedback for LinearLayout tab: - Name validation: must be non-empty after trimming - Size validation: must be power of 2 and >= 2 - Red border highlighting on invalid fields - Inline error messages below each field - Warning-style status message for overall validation state Creates LinearLayoutValidator following InputValidator pattern: - Extracted validation logic to src/validation/LinearLayoutValidator.ts - Added comprehensive unit tests (7 tests covering all validation rules) - Proper dependency flow: validator owns types, tab imports them UI improvements: - Added .input-error CSS class for invalid field styling - Added .layout-status CSS class matching validation-warnings style - Prevents matrix updates when validation fails Core library unchanged: - Validation enforced only at UI layer (LinearLayoutTab) - Core LinearLayout.ts supports all valid cases including size=1 - Added regression test for degenerate (size=1) dimension handling - BlockLayout, MFMALayout, WMMALayout unaffected 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements real-time validation with visual feedback for LinearLayout tab:
Creates LinearLayoutValidator following InputValidator pattern:
UI improvements:
Core library unchanged:
🤖 Generated with Claude Code